<!-- TODO: not done ; donot use！！！ -->

<template>
  <div>
    <el-radio-group v-model="value" :value="radio" size="medium" @change="onChange">
      <el-radio label="1">aaa</el-radio>
      <el-radio label="2">bbb</el-radio>
    </el-radio-group>

    <!-- <el-radio :key="item.label + '_' + index" v-for="(item, index) in items" :value="value" :label="item.label" @change="onChange(item)">{{item.text}}</el-radio> -->
  </div>
</template>

<script>
  export default {
    data() {
      return {
        radio: '1',
      }
    },
    model: {
      prop: 'value',
      event: 'change',
    },
    props: ['value', 'items'],
    mounted() {
      this.radio = this.value;
    },
    methods: {
      onChange(val) {
        this.radio = val;
        this.$emit('change', val.toString());
      },
    },
  }
</script>

<style lang="scss"></style>
